<?php get_header() ?>

<div class="container">
	<div class="row">
    	<div class="col-sm-9 right-col detail_content">
                    <?php if ( have_posts() ) : the_post(); ?>
                    <h3 class="bar">
                        <a href="#"><?php the_title() ?></a>
                        <span class="info_top">
                            <?php the_date(); ?> | <?php the_author(); ?>
                        </span>
                    </h3>
                    <?php the_content() ?>
                    <?php endif; ?>
                    <div class="div_social">
                    	<div class="share_social">
                        	<div class="first_social">
                            	<div>
                                	<div class="fb-like" data-href="<?php the_permalink() ?>" data-layout="button_count" data-action="like" data-show-faces="true" data-share="true"></div>
                                </div>
                                <div>
                                	<div class="g-plusone" data-size="medium"></div>
                                </div>
                            </div>
                            <!-- <div class="second_social">
                            	<img src="images/fb_share.gif">
                            </div> -->
                        </div>
                        <div class="comment">
                            <div class="cmt_frm">
                            	<div class="fb-comments" data-href="<?php the_permalink() ?>" data-width="100%" data-numposts="5" data-colorscheme="light"></div>
                            </div>
                        </div>
                    </div>                    
                </div>
       <?php
       $cateTieuDiem = 4;
       $cateDuAn = 6;
       ?>
    	<div class="col-sm-3 left-col">
        	<div class="left_boxes">
            	<h3 class="bar">
                	<a href="<?php echo get_category_link( $cateTieuDiem ); ?> ">
			            <?php echo get_cat_name( $cateTieuDiem ) ?>
			        </a>
                </h3>
                <?php $queryTieuDiem = new WP_Query( array('cat' => $cateTieuDiem, 'posts_per_page' => 6)); ?>
                <?php if ( $queryTieuDiem->have_posts() ) : ?>
                <ul>
                	<?php while ( $queryTieuDiem->have_posts() ) : $queryTieuDiem->the_post(); ?>
                	<li>
                    	<a href="<?php the_permalink() ?>"><?php echo trim_text(get_the_title(), 40) ?></a>
                    </li>
					<?php endwhile; ?>
                </ul>
            	<?php endif; ?>
            </div>
			<?php wp_reset_postdata(); ?>

            <div class="left_boxes duan_phanphoi">
            	<h3 class="bar">
                	<a href="<?php echo get_category_link( $cateDuAn ); ?> ">
			            <?php echo get_cat_name( $cateDuAn ) ?>
			        </a>
                </h3>
                <?php $queryDuAn = new WP_Query( array('cat' => $cateDuAn, 'posts_per_page' => 6)); ?>
                <?php if ( $queryDuAn->have_posts() ) : ?>
                <ul>
                	<?php while ( $queryDuAn->have_posts() ) : $queryDuAn->the_post(); ?>
                	<li>
                    	<a href="<?php the_permalink() ?>"><?php echo trim_text(get_the_title(), 40) ?></a>
                    </li>
					<?php endwhile; ?>
                </ul>
            	<?php endif; ?>
         	</div>
    		<?php wp_reset_postdata(); ?>
        </div>
        
    </div>            
</div>

<?php get_footer() ?>